Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. battery monitor
    Log in to post

    • M

      Read battery voltage of pysense or pytrack
      Discussion • pysense pytrack battery battery monitor • • misterlisty  

      2
      0
      Votes
      2
      Posts
      265
      Views

      J

      @misterlisty you already asked the same question in January.
    • G

      How to read the battery level of a Pytrack/Pysens
      Discussion • pytrack pysense pytrack battery battery monitor pysense battery • • Gaby  

      9
      0
      Votes
      9
      Posts
      1323
      Views

      S

      @robert-hh ah ok, thank you for explaining. so I set it to 3.28 V and I am on the safe side ;) thanks
    • M

      How do i measure the battery voltage?
      Discussion • battery monitor • • misterlisty  

      4
      0
      Votes
      4
      Posts
      731
      Views

      J

      @misterlisty If you are using a Pysense or Pytrack you don't need to use the ADC input or add a voltage divider. That's already done on the board, and you can read it using the read_battery_voltage method of the relevant library. I think it's also more accurate that the ESP32 ADC, though I haven't really compared them.
    • J

      Can Lopy measure the battery?
      Comments & Feedback • lopy battery monitor • • jclo13  

      5
      0
      Votes
      5
      Posts
      1379
      Views

      J

      @jcaron thank you, I am using an expansion board, but I will try it whit pysense.
    • B

      Expansion Board Suggestions
      Expansion Board • pytrack expansionboard battery monitor features suggestions • • brotherdust  

      16
      4
      Votes
      16
      Posts
      3613
      Views

      Charly86

      @brotherdust any chance you share the pin pad mapping on the bottom (at least RX/TX) ?
    • ledbelly2142

      LoPy with Expansion board, How do you measure LiPo Battery up to 4.2V?
      LoPy • lopy battery battery powered battery monitor • • ledbelly2142  

      4
      0
      Votes
      4
      Posts
      2709
      Views

      ledbelly2142

      @jmarcelino Once again, thanks for the great feedback. I was looking for a simple way to alert when the battery needs to be recharged. Looks like some simple logic could be: if voltages gets to 3.3, alert for recharge... So many LiPo batteries have differing characteristics, even among the same model/make/capacity/manufacturer. I don't think there is real value is tracking a percentage... without extensive battery testing. Simplest thing to do is just report voltage. From the example from HERE do you recommend using the following: numADCreadings = const(100) def ADCloopMeanStdDev(): adc = machine.ADC(0) adcread = adc.channel(attn=1, pin='P16') samplesADC = [0.0]*numADCreadings; meanADC = 0.0 i = 0 while (i < numADCreadings): adcint = adcread() samplesADC[i] = adcint meanADC += adcint i += 1 meanADC /= numADCreadings varianceADC = 0.0 for adcint in samplesADC: varianceADC += (adcint - meanADC)**2 varianceADC /= (numADCreadings - 1) print("%u ADC readings :\n%s" %(numADCreadings, str(samplesADC))) print("Mean of ADC readings (0-1023) = %15.13f" % meanADC) print("Mean of ADC readings (0-1400 mV) = %15.13f" % (meanADC*1400/1024)) print("Variance of ADC readings = %15.13f" % varianceADC) print("10**6*Variance/(Mean**2) of ADC readings = %15.13f" % ((varianceADC*10**6)//(meanADC**2))) print("ADC reading for Voltage (0-1400 mV) = %15.4f" % (meanADC*1400/1024)) From the ACD pin 16 voltage, the voltage is the meanACD*1400/1024 Does not seem right, the output is 4966.3634.
    • R

      Correct formula for BATT monitoring on expansion board
      LoPy • lopy expansion board battery monitor • • roadfox  

      11
      0
      Votes
      11
      Posts
      3328
      Views

      J

      @robert-hh, the method function very well, thank you
    • 1 / 1